Skip to main content

Test your integration with test ads

Request Test Ads

When testing you should request ads by setting the test flag to true when initializing XMediator and when creating ad instances. We use this flag to ask the underlying networks to provide us with test ads when possible.

info

Some mediation services (or their underlying networks) may not support this flag and might provide other means to test their integration, so make sure to always check their documentation for any additional steps.

We do provide test Placement Ids to enable a quick way to test the integration.

Test Placement Ids
PlacementMAX MediationLevelPlay Mediation
App keyV148L42DRGV148L42DR3
BannerV142XB3LRNZCM7V142YBZL36TNH7
InterstitialV142XBGL601BCDV142YB3L1J9DKT
RewardedV142DRKLYD2CVXV142YBGLYF22ST

Currently, these placements are only supported for these ad networks: Google Ads, AppLovin, Chartboost, Unity Ads and Liftoff Monetize.

warning

Remember to replace these test placements with your own placements and always set the test flags to false in a production environment

Enable test mode

Set the test flag to true to see test ads when available.

import XMediator

#if DEBUG
let shouldRequestTestAds = true
#else
let shouldRequestTestAds = false
#endif

// Initialize
let initSettings = InitSettings(test: shouldRequestTestAds)
XMediatorAds.startWith(appKey: "V148L42DRG",
initSettings: initSettings) { result in
XMediatorAds.banner.create(placementId: "V142XB3LRNZCM7", size: .phone, viewController: self)
XMediatorAds.interstitial.load(placementId: "V142XBGL601BCD")
XMediatorAds.rewarded.load(placementId: "V142DRKLYD2CVX")
}

Enable verbose logging

Setting the verbose flag to true will output extra logging information to the standard output.

let initSettings = InitSettings(verbose: true)
XMediatorAds.startWith(appKey: "V148L42DRG",
initSettings: initSettings) { _ in
// [...]
}